<extend name="Public:innerbase" />

<block name="js">

<script src="{:RES}/js/date/WdatePicker.js"></script>

</block>

<block name="content">

<div class="container-fluid">

	<ul class="nav nav-tabs wm-tabs">

		<li><a href="{:U('Member/order')}">实盘流水记录</a></li>

		<!--<li><a href="{:U('Member/xuorder')}">虚拟盘流水记录</a></li>-->

		<li class="active"><a href="javascript:void(0)">流水统计</a></li>

	</ul>

	<div class="page-header wm-page-header">

	<form method="get" action="__SELF__" class="form-inline">
	 			<label>开始日期</label>
	 			<input name="startdate" type="date" value="{$_GET['startdate']}" class="form-control" />
	 			<label>结束日期</label>
	 			<input name="enddate" type="date" value="{$_GET['enddate']?$_GET['enddate']:$date|time=''}" class="form-control" />
	 			<button class="btn btn-primary" type="submit">
	 				<span class="glyphicon glyphicon-search"></span>
	 				查询
	 			</button>
	 			</form> 

	</div>

	<TABLE class="table wm-table-bordered table-striped table-hover">

		<THEAD>

		<TR>

			<TH>日期</TH>	

			<TH>用户数量</TH>

			<TH>总记录数</TH>

			<TH>总交易额</TH>

			<TH>买涨条数</TH>
			
			<TH>买跌条数</TH> 

			<TH>盈利条数</TH>

			<TH>亏损条数</TH> 

			<TH>盈利交易额</TH>

			<TH>盈利结算</TH>

			<TH>亏损交易额</TH>

			<TH>总结算（亏损交易额 - 盈利结算）</TH>


		</TR>

		</THEAD>

		<TBODY>

		<volist id="list" name="list">

		<TR>

			<TD>{$list.date}</TD>

			<TD>{$list.disuseridcount}</TD>

			<TD>{$list.useridcount}</TD>

			<TD>￥<if condition="$list.allsum eq null">0<else />{$list.allsum}</if></TD>

			<TD>{$list.buyupcount}</TD>

			<TD>{$list.buydowncount}</TD>


			<TD>{$list.wincount}</TD>
			<TD>{$list.losecount}</TD>
			<TD>￥<if condition="$list['winsum'] eq null">0<else />{$list.winsum}</if></TD>
			<TD>￥<if condition="$list['wincashsum'] eq null">0<else />{$list.wincashsum}</if></TD>
			<TD>￥<if condition="$list['losesum'] eq null">0<else />{$list.losesum}</if></TD>
			<TD>
				<if condition="$list['losesum']-$list['wincashsum'] eq null">
					￥0
				<elseif condition="$list['losesum']-$list['wincashsum'] gt 0"/>
					￥<span style="color:red"><php>echo $list['losesum']-$list['wincashsum'];</php></span>
				<else />
					￥<span style="color:green"><php>echo $list['losesum']-$list['wincashsum'];</php></span>
				</if>
			</TD>
			

		</form>

		</TR>

		</volist>

	  </TBODY>

	</TABLE>

	<div>{$page}</div>

</div>

</block>